home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / includ~1.z / includ~1 / setjmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-02  |  870 b   |  33 lines

  1. /* The <setjmp.h> header relates to the C phenomenon known as setjmp/longjmp.  
  2.  * It is used to escape out of the current situation into a previous one.  
  3.  * A typical example is in an editor, where hitting DEL breaks off the current 
  4.  * command and puts the editor back in the main loop.
  5.  */
  6.  
  7. /* _JBLEN should be 3 for IBM PC, 13 for ATARI. */
  8.  
  9. #ifndef _SETJMP_H
  10. #define _SETJMP_H
  11.  
  12. #define _JBLEN 13
  13.  
  14. typedef int jmp_buf[_JBLEN];
  15.  
  16. /* Function Prototypes. */
  17. #ifndef _ANSI_H
  18. #include <ansi.h>
  19. #endif
  20.  
  21. _PROTOTYPE( int setjmp, (jmp_buf __env)                    );
  22. _PROTOTYPE( void longjmp, (jmp_buf __env, int __val)            );
  23.  
  24. #ifdef _POSIX_SOURCE
  25. typedef sigjmp_buf[_JBLEN+1];    /* regular stuff plus mask */
  26.  
  27. _PROTOTYPE( int sigsetjmp, (sigjmp_buf __env, int __savemask)        );
  28. _PROTOTYPE( int siglongjmp, (sigjmp_buf __env, int __val)        );
  29.  
  30. #endif /* _POSIX_SOURCE */
  31.  
  32. #endif /* _SETJMP_H */
  33.